<template>
	<view>
		<button type="default" @click="ceshichange()">测试</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				i:0
			}
		},
		methods: {
			// 组件传值 to index.nvue
			ceshichange(){
				let pages = getCurrentPages()
				let index = pages[0].$getAppWebview()
				plus.webview.postMessageToUniNView({
					res:(`我是传过来的数据+${this.i++}`)
				},index.id)
				uni.navigateBack()
				
			}
		}
	}
</script>

<style>

</style>
